﻿using System;
using System.ComponentModel;

namespace Charts
{
	public class DataItem : INotifyPropertyChanged
	{
		private string _Category;
		public string Category {
			get { return _Category; }
			set { if (_Category == value) return;
				_Category = value;
				OnPropertyChanged("Category");
			}
		}
		
		private double _Value;
		public double Value {
			get { return _Value; }
			set { if (_Value == value) return;
				_Value = value;
				OnPropertyChanged("Value");
			}
		}
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void OnPropertyChanged(string propertyName)
		{
			if (PropertyChanged != null) {
				PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
}
